package cn.signalpha.modules.com.entity;

import cn.signalpha.core.swagger.ApiModelPropertyEnum;
import cn.signalpha.modules.com.entity.enums.WalletAmountTypeEnum;
import cn.signalpha.modules.com.entity.enums.WalletSourceEnum;
import cn.signalpha.modules.com.entity.enums.WalletTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类
 *
 * @author signalpha
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("com_user_wallet")
@ApiModel(value = "UserWallet对象", description = "用户钱包")
public class UserWallet implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
	@TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "类型")
	@ApiModelPropertyEnum(WalletTypeEnum.class)
    private Integer type;

    @ApiModelProperty(value = "金额")
    private Double amount;

    @ApiModelProperty(value = "金额类型")
	@ApiModelPropertyEnum(WalletAmountTypeEnum.class)
    private Integer amountType;

    @ApiModelProperty(value = "剩余金额")
    private Double amountLast;

    @ApiModelProperty(value = "来源id")
    private String sourceId;

    @ApiModelProperty(value = "来源类型")
	@ApiModelPropertyEnum(WalletSourceEnum.class)
    private String sourceType;

    @ApiModelProperty(value = "备注")
    private String remark;

	@ApiModelProperty(value = "说明")
	private String explains;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

}
